package com.example.baseapp.common;

import java.util.HashMap;
import java.util.Map;

public class OrderStatusEnum {
    
    public static final String PENDING = "PENDING";
    public static final String PAID = "PAID";
    public static final String PREPARING = "PREPARING";
    public static final String DELIVERING = "DELIVERING";
    public static final String COMPLETED = "COMPLETED";
    public static final String CANCELLED = "CANCELLED";
    
    private static final Map<String, String> STATUS_MAP = new HashMap<>();
    
    static {
        STATUS_MAP.put(PENDING, "待支付");
        STATUS_MAP.put(PAID, "已支付");
        STATUS_MAP.put(PREPARING, "制作中");
        STATUS_MAP.put(DELIVERING, "配送中");
        STATUS_MAP.put(COMPLETED, "已完成");
        STATUS_MAP.put(CANCELLED, "已取消");
    }
    
    public static String getStatusText(String status) {
        return STATUS_MAP.getOrDefault(status, status);
    }
    
    public static Map<String, String> getStatusMap() {
        return new HashMap<>(STATUS_MAP);
    }
    
    public static String[] getAllStatuses() {
        return new String[]{PENDING, PAID, PREPARING, DELIVERING, COMPLETED, CANCELLED};
    }
} 